<?php
require("class.phpmailer.php");
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->isHTML(true);
$mailer->Host = 'mail.pcw.my:2525';
$mailer->SMTPAuth = TRUE;
$mailer->Username = 'ips1@pcw.my';  // Change this to your gmail adress
$mailer->Password = 'passw0rd';  // Change this to your gmail password
$mailer->From = 'admin@pcw.my';  // This HAVE TO be your gmail adress
$mailer->FromName = 'Admin'; // This is the from name in the email, you can put anything you like here
$mailer->Body = 'This is the main body of the email<html><a href="google.com">ayam</a></html>';
$mailer->Subject = 'This is the subject of the email';

$emailall="desmondyktan@gmail.com";

$semail=split(",",$emailall);
foreach($semail as $emailadd)
{
	$mailer->AddAddress($emailadd);  // This is where you put the email adress of the person you want to mail
}
if(!$mailer->Send())
{
   echo "Message was not sent<br/ >";
   echo "Mailer Error: " . $mailer->ErrorInfo;
}
else
{
   echo "Message has been sent";
}
?>